//
//  MyCollectionViewCell.m
//  UI_15_网易上面的滑动button
//
//  Created by li cheng on 16/8/3.
//  Copyright © 2016年 li cheng. All rights reserved.
//

#import "MyCollectionViewCell.h"

@interface MyCollectionViewCell()
@end
@implementation MyCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _button = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:_button];
        
//        
//        _button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
//        _button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
//        contentHorizontalAlignment UIControlContentHorizonAlignmentLeft;

        
//        _label = [[UILabel alloc] init];
////        _label.font = [UIFont fontWithName:@"Arial-BoldMT" size:16];
//        [self.contentView addSubview:_label];
         self.backgroundColor = [UIColor colorWithRed:arc4random()% 256 / 255.0f green:arc4random()% 256 / 255.0f blue:arc4random()% 256 / 255.0f alpha:1];
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    [super applyLayoutAttributes:layoutAttributes];
}
- (void)layoutSubviews{
    [super layoutSubviews];
//    self.label.frame = self.contentView.bounds;
        self.button.frame = self.contentView.bounds;
}
@end
